var pict = document.querySelectorAll('.pic')
pict.forEach(pic =>{
    pic.addEventListener('click',()=>{
        remove()
        pic.classList.add('active')
    })
})
function remove(){
    pict.forEach(pic =>{
        pic.classList.remove('active')
    })
}